<?php


class FaqItem {
	public $id;
	public $question;
	public $answer;

	public function __construct( $id, $question, $answer ) {
		$this->id = $id;
		$this->question = $question;
		$this->answer = $answer;
	}

	public function getUri() {
		return "#".$this->id;
	}
}

abstract class FaqBean {
	public abstract function getItems();
}

class PhpProgrammersFaqBean extends FaqBean {
	private $items;
	public function getItems() {
		if( $this->items == null ) {
			$this->items = array( 
				new FaqItem( 1, "Is this question 1?", "Yes" ),
				new FaqItem( 2, "Is this question 4?", "No" )
			);
		}		

		return $this->items;
	}
}


?>
